<template>
    <div class="desc-container">
        <h4>{{goodsdesc.title}}</h4>
        <hr>
        <div v-html="goodsdesc.content"></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            id:this.$route.params.id,
            goodsdesc:[]
        }
    },
    created(){
        this.getdesc()
    },
    methods:{
        getdesc(){
            this.$http.get("api/goods/getdesc/"+this.id).then(result=>{
                if(result.body.status === 0){
                    this.goodsdesc = result.body.message[0]
                }
            })
        }
    }
}
</script>

<style lang="less">
    .desc-container{
        h4{
            color: skyblue;
            text-align: center;
            padding: 10px 0;
        }
        img{
            display: inline-block;
            width:100%;
        }
    }
</style>
